require 'todo_list'
ActionView::Base.send :include, TodoList

directory = "#{RAILS_ROOT}/vendor/plugins/todo_list"
controller_path = File.join(directory, 'app', 'controllers')
require "#{controller_path}/todo_list_controller.rb"
$LOAD_PATH << controller_path
if defined?(RAILS_GEM_VERSION) and RAILS_GEM_VERSION >= '1.2.0'
  Dependencies.load_paths << controller_path
else
  raise "Engines plugin is needed for running todo_list with \
  a Ruby on Rails version < 1.2.0" if Dir["#{RAILS_ROOT}/vendor/plugins/engines"].empty?
end
config.controller_paths << controller_path
